<%@ page import="com.gong.bank.model.UserBean" %>
<%@ page import="java.io.PrintWriter" %><%--
  Created by IntelliJ IDEA.
  User: gjh18
  Date: 4/8/2022
  Time: 上午8:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>主页面</title>
</head>
<body>
<h1>主页面</h1>
<div>
    <%UserBean userBean = (UserBean)request.getAttribute("user");%>
    <p>欢迎${user.username}<%=userBean.getAdmin()==1? "管理员":"用户"%></p>
    <p>你的余额为${user.money}</p>

</div>
<a href="add.jsp"><button>存款</button></a>
<a href="reduce.jsp"><button>取款</button></a>
<a href="zhuanzhang.jsp"><button>转账</button></a>
<a href="logController"><button>查询操作明细</button></a>
<a href="index.jsp"><button>注销</button></a>
<%
    if (userBean.getAdmin()==1){
        request.getRequestDispatcher("admin.jsp").forward(request,response);
    }
%>
</body>
</html>
